<template>
  <img alt="Vue logo" src="./assets/logo.png" /><br/>
  <Com/>
  <router-link to="/">setup</router-link>
  |<router-link to="/other">other</router-link>
  |<router-link to="/vuex">vuex</router-link>
  |<router-link to="/jsx">jsx</router-link>
  |<router-link to="/mock">mock</router-link>
  <router-view v-if="$route.name == 'other'" msg = '传递给子组件'  @myclick = "func1"></router-view>
  <router-view v-else></router-view>
</template>


<script setup>
import { provide } from '@vue/runtime-core';
import Com from './components/com.vue';
const func1 = () => {
  console.log('hello this is emit')
}
const ftext = provide('fatherData','xxxxxx')
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
